package com.huaxin.device.dto.enums.validation;

import com.huaxin.device.dto.enums.validator.EquipmentTypeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = EquipmentTypeValidator.class)
public @interface ValidEquipmentType {
    String message() default "无效的设备类型，允许值：Transformer, Cabinet, Switchgear, Generator, UPS, PDU, Meter, Sensor, Busway, DistributionBox, CapacitorBank, Motor, LightingPanel, TransferSwitch, SurgeProtector";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}